import pandas as pd

from featureEngineering import sheet_name


def convert_to_days(gestational_week):

    if pd.isna(gestational_week):
        return 0
    else:
        return 1


if __name__ == "__main__":
    df = pd.read_excel('data.xlsx',sheet_name='女胎检测数据')
    df['是否异常'] = df['染色体的非整倍体'].apply(convert_to_days)
    print(df)
    df.to_excel('data_after_process_4.xlsx', index=False)
